package com.xxl.job.executor.enums;

/**
 * @author huanghaifeng
 * @ClassName EnTimeEnum
 * @Date 2019-04-24
 */
public enum TableIdEnum {
    GBUPLOADETCTU("GBUPLOAD_ETCTU", "tradeId"),
    BASICETCBOUTLIST("BASIC_ETCBOUTLIST", "ListNo"),
    BASICBOUTLIST("BASIC_BOUTLIST", "ListNo"),
    BASICBINLIST("BASIC_BINLIST", "ListNo"),
    BASICETCBINLIST("BASIC_ETCBINLIST", "ListNo"),
    BASICGRANTRYTRANSMAIN("BASIC_GRANTRYTRANSMAIN", "tradeId");


    private String key;
    private String value;


    TableIdEnum(String key, String value) {
        this.key=key;
        this.value=value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static String getTableId(String key) {
        for (TableIdEnum tablIdEnum : TableIdEnum.values()) {
            if (key.equals(tablIdEnum.getKey())) {
                return tablIdEnum.getValue();
            }
        }

        return null;
    }


}
